package cn.iocoder.yudao.module.system.api.tenant.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;

@Data
public class TenantUpadateVo implements Serializable {

    @ApiModelProperty(value = "id",  example = "1024")
    @NotEmpty(message = "id不能为空")
    private Long id;

    @ApiModelProperty(value = "用户账号",  example = "yudao")
    @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成")
    @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符")
    private String username;

    @ApiModelProperty(value = "密码",  example = "123456")
    @Length(min = 4, max = 16, message = "密码长度为 4-16 位")
    private String password;

    @ApiModelProperty(value = "租户名", example = "芋道")
    private String name;

    @ApiModelProperty(value = "联系人",  example = "芋艿")
    private String contactName;

    @ApiModelProperty(value = "联系手机", example = "15601691300")
    private String contactMobile;

    @ApiModelProperty(value = "租户状态",  example = "1")
    private Integer status;

    @ApiModelProperty(value = "绑定域名", example = "https://www.iocoder.cn")
    @URL(message = "绑定域名的地址非 URL 格式")
    private String domain;

    @ApiModelProperty(value = "租户套餐编号", example = "1024")
    private Long packageId;

    @ApiModelProperty(value = "过期时间")
    private Date expireTime;

    @ApiModelProperty(value = "账号数量",  example = "1024")
    private Integer accountCount;
}
